﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebUI.Controllers
{
    public class ArticleController : Controller
    {
        //
        // GET: /Article/

        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 分页加载文章信息
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="rows">页大小</param>
        /// <param name="order">排序字段</param>
        /// <param name="sort"></param>
        /// <returns>用户信息</returns>
        public JsonResult LoadAllByPage(int page, int rows, string order, string sort)
        {
            return Json("");
        }

        /// <summary>
        /// 编辑或者增加文章视图
        /// </summary>
        /// <param name="id">文章编码</param>
        /// <returns>编辑视图</returns>
        public ActionResult ArticleView(int? id)
        {
            return View();
        }

        /// <summary>
        /// 保存文章信息
        /// </summary>
        /// <param name="article">文章信息</param>
        /// <returns>保存状态</returns>
        public JsonResult Save(string article)
        {
            return Json("test");
        }

        /// <summary>
        /// 批量删除文章信息
        /// </summary>
        /// <param name="list">被删除的文章列表</param>
        /// <returns>删除状态</returns>
        public JsonResult Del(string[] list)
        {
            return Json("json");
        }
    }
}
